home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / OpenDoc / Interfaces / IDL / ODTypesM.idl < prev    next >
Encoding:
Text File  |  1997-02-13  |  5.6 KB  |  247 lines  |  [TEXT/MPS ]

  1. //#    Copyright:    © 1993-1995 by Apple Computer, Inc., all rights reserved.
  2.  
  3. #ifndef _ODTYPESM_
  4. #define _ODTYPESM_
  5.  
  6. #define _PLATFORM_MACINTOSH_
  7.  
  8. #ifndef _PLATFORM_BIG_ENDIAN_
  9. #define _PLATFORM_BIG_ENDIAN_
  10. #endif
  11.  
  12. // Platform-specific types. Four byte types are defined as unsigned long, 
  13. // rather than 
  14. // foreign, so that they can be marshalled. They are not emitted however,
  15. // so that the actual type definitions in ODTypesF.h are used, so that type
  16. // casting is not necessary where these types are used.
  17.  
  18. typedef unsigned long ODPlatformCanvas;
  19. typedef unsigned long ODPlatformPrintJob;
  20. typedef unsigned long ODPlatformShape;        // Graphics-system-dependent shape data
  21. typedef unsigned long ODPlatformTransform;  // Graphics-system-dependent transform data
  22. typedef unsigned long ODRgnHandle;
  23. typedef unsigned long ODgxShape;
  24. typedef unsigned long ODPlatformWindow;
  25. typedef unsigned long ODPlatformMenu;
  26. typedef unsigned long ODPlatformMenuBar;
  27. typedef unsigned long ODOSType;
  28. typedef unsigned long ODPlatformType;        // Host platform file & data type
  29. typedef unsigned long ODHandle;
  30. typedef unsigned long ODPlatformDragReference;
  31.  
  32. struct Point {        // This is a QuickDraw "Point" structure.
  33.     short v;            // It's 32 bits, but still a struct, and for things to work
  34.     short h;            // at runtime, SOM has to _know_ that it's really a struct.
  35. };                        // ("Don't fool SOM!" --Erik Eidt)               --jpa
  36.  
  37. struct Rect {        // This is a QuickDraw "Rect" structure.
  38.     short top;
  39.     short left;
  40.     short bottom;
  41.     short right;
  42. };                    
  43.  
  44. //#struct AEDesc {            // This is the Apple events structure of the same name.
  45. //#    unsigned long    descriptorType;
  46. //#    unsigned long    dataHandle;
  47. //#};                    
  48.  
  49. typedef unsigned long    DescType; 
  50. typedef unsigned long    AEEventClass;
  51. typedef unsigned long    AEEventID;
  52. typedef long            AESendMode;
  53. typedef short            AESendPriority;
  54.  
  55. struct EventRecord {
  56.     short                        what;
  57.     long                        message;
  58.     long                        when;
  59.     Point                        where;
  60.     short                        modifiers;
  61. };
  62.  
  63. // End of platform types
  64.  
  65. #ifndef _ODTYPESB_
  66. #include "ODTypesB.idl"
  67. #endif
  68.  
  69. #ifndef _GEOTYPES_
  70. #include "GeoTypes.idl"
  71. #endif
  72.  
  73. #if defined(__SOMIDL__) && defined(EMIT_GLOBAL_TYPES)
  74. #pragma somemittypes on
  75. #endif
  76.  
  77. #ifdef _PLATFORM_MACINTOSH_
  78.  
  79. //#=============================================================================
  80. //# Emitted Types, Consts, Enums, etc.
  81. //#=============================================================================
  82.  
  83. //# // Semantic Interface
  84.  
  85. typedef DescType    ODDescType;
  86.  
  87. //#typedef AEDesc        ODDesc;
  88.  
  89. typedef AESendMode        ODSendMode;
  90. typedef AESendPriority    ODSendPriority;
  91.  
  92. typedef    AEEventClass    ODEventClass;
  93. typedef    AEEventID        ODEventID;
  94.  
  95. // Types added for OSAObject support
  96.  
  97. typedef ODULong  ODScriptingSubType;
  98. typedef ODULong  ODScriptingConnection;
  99. typedef ODULong  ODOSAID;
  100.  
  101.  
  102. // OS specific types
  103. //
  104. //  The following typedefs are OS specific. They are put together in this file for the
  105. //  time being. However, they can be put into separate files if desired. For example,
  106. //  all the primitive types will be put in ODPlatformMisc.h;
  107. //  all graphics system types will be put in ODPlatformGraphics.h;
  108. //  all File system types will be put in ODPlatformFiles.h; and so on.
  109. //  The advantage of splitting them in separate files is the changing one type will not
  110. //  require recompiling all the files which includea ODTypes.h. Also, there may be a lot
  111. //  of OS-specific types. If that's the case, we don't want them all in one file.
  112. //
  113.  
  114. // Text
  115.  
  116. typedef long ODITextFormat;
  117.  
  118.  
  119. struct ODIText {
  120.     ODITextFormat    format;
  121.     ODByteArray        text;
  122. };
  123.  
  124. typedef ODIText ODName; 
  125. typedef ODName  ODContainerName;
  126. typedef ODName  ODDocumentName;
  127.  
  128. // Imaging
  129.  
  130. typedef ODHandle    ODIconFamily;
  131.  
  132. // Events
  133.  
  134. typedef ODUShort     ODEventType;
  135.  
  136. typedef EventRecord    ODEventData;
  137.  
  138. interface ODFrame;
  139. interface ODFacet;
  140.  
  141. struct ODEventInfo
  142. {
  143.     ODFrame embeddedFrame;
  144.     ODFacet embeddedFacet;
  145.     ODPoint where;
  146.     ODBoolean propagated;
  147. };
  148.  
  149.  
  150. typedef ODULong          ODIdleFrequency;
  151.  
  152. typedef ODULong            ODTime;
  153.  
  154. // Menus
  155.  
  156. typedef ODSShort    ODMenuID;
  157. typedef ODSShort    ODMenuItemID;
  158. typedef ODSLong        ODCommandID;
  159.  
  160.  
  161. // Windows
  162.  
  163. typedef ODUShort    ODWindowLayer;
  164.  
  165.  
  166. // Name Binding
  167.  
  168. typedef ODISOStr ODKind;            // An opaque type identifying a specific part kind
  169. typedef ODISOStr ODCategory;        // An opaque type identifying a specific part category
  170. typedef ODISOStr ODEditor;            // An opaque type identifying a specific part editor
  171. typedef ODISOStr ODContainerSuite;  // An opaque type identifying a specific container suite
  172.  
  173. typedef ODULong ODUpdateID;            // Content update IDs
  174.     
  175. typedef ODULong    ODDraftKey;
  176.  
  177. // Drag and Drop
  178.  
  179. typedef ODBoolean ODDragResult;
  180.  
  181. // Link Protocol
  182.  
  183. typedef ODULong ODLinkUpdateResult;
  184.  
  185.  
  186. typedef ODULong ODPasteAsMergeSetting;
  187.  
  188.  
  189. struct ODLinkInfo
  190. {
  191.     ODType            kind;
  192.     ODTime            creationTime;
  193.     ODTime            changeTime;
  194.     ODUpdateID        change;
  195.     ODBoolean        autoUpdate;
  196. };
  197.  
  198. // Link Dialogs
  199.  
  200. struct ODPasteAsResult
  201. {
  202.     ODBoolean        pasteLinkSetting;
  203.     ODBoolean        autoUpdateSetting;
  204.     ODBoolean        mergeSetting;
  205.     ODTypeToken        selectedView;
  206.     ODType            selectedKind;
  207.     ODType            translateKind;
  208.     ODEditor        editor;
  209. };
  210.  
  211. enum ODLinkInfoAction
  212. {
  213.     kODLinkInfoCancel    /* = 0 */,
  214.     kODLinkInfoOk,
  215.     kODLinkInfoBreakLink,
  216.     kODLinkInfoUpdateNow,
  217.     kODLinkInfoFindSource
  218. };
  219.  
  220. struct ODLinkInfoResult
  221. {
  222.     ODLinkInfoAction    action;
  223.     ODBoolean            autoUpdate;
  224. };
  225.  
  226. //==============================================================================
  227. // Constants
  228. //==============================================================================
  229.  
  230.  
  231.  
  232.  
  233.  
  234. #if defined(__SOMIDL__) && defined(EMIT_GLOBAL_TYPES)
  235. #pragma somemittypes off
  236. #endif
  237.  
  238.  
  239. #endif //# _PLATFORM_MACINTOSH_
  240.  
  241. module OpenDoc_Global_Types 
  242. {
  243.     const string OpenDoc_Types_Version = "1.0.";
  244. };
  245.  
  246. #endif  //# _ODTYPESM
  247.